<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
	<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
	<%
		String path = request.getContextPath();
	%>
	<%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
	<%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
	<link rel="stylesheet" type="text/css" href="${path}/html/js/js-resource/imgPreview/css/style.css"/>
	<script type="text/javascript" src="${path}/html/js/jquery.form.js"></script>
	<script type="text/javascript" src="${path}/html/js/js-jsp/uploadFile.js?v=<%out.print(Math.random());%>"></script>
	<script type="text/javascript" src="${path}/html/js/js-resource/imgPreview/js/lightBox.js"></script>
	<script type="text/javascript" src="${path}/html/js/js-jsp/us/employee/employeeOption.js?v=<%out.print(Math.random());%>"></script>
	<script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js"></script>
</head>
	<body>
		<div class="place">
			<span>当前位置：</span>
			<ul class="placeul">
				<li><a href="${path}/employee/index.do" style="background: transparent; border: none;">员工管理</a></li>
				<li>
					<c:if test="${null == employee.emId}">
						<a style="background: transparent; border: none;">添加员工</a>
					</c:if>
					<c:if test="${null != employee.emId}">
						<a style="background: transparent; border: none;">编辑员工</a>
					</c:if>
				</li>
			</ul>
		</div>
		<form id="operate_form" name="operate_form" class="form" method="post" action="#" enctype="multipart/form-data">
			<div class="formbody gridFrom">
				<div class="formtitle"><span>基本信息</span></div>
				<dl>
					<dd>
						<c:if test="${null != employeePhoto.employeePhotoCF.fileId}">
							<div style="width:120px; height: 160px;left: 55px; border: 1px; bottom: 23px; position: relative">
								<img id="showImg" style="width:120px; height: 160px;" />
							</div>
						</c:if>
						<c:if test="${null == employeePhoto.employeePhotoCF.fileId}">
							<div style="width:120px; height: 160px;left: 55px; border: 1px; bottom: 23px; position: relative">
								<img id="showImg" style="width:120px; height: 160px;" src="${path}/html/images/defaulPhoto/defaulPhoto.jpg" />
							</div>
						</c:if>
					</dd>
					<dd>
						<input type="hidden" name="emId" id="emId" value="${employee.emId}" />
						<input type="hidden"  id="oldEmId" value="${employee.emId}">
						<input type="hidden" name="usId" id="usId" value="${employeePhoto.user.usId}" />
						<span class="title" style="width:120px;">员工姓名：</span>
						<input class="easyui-textbox" type="text" name="name" id="name" data-options="required:true,validType:['length[1,10]','name'],prompt:'请输入员工名称'" missingMessage="员工名称不能为空"  value="${employee.name}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px;">员工工号：</span>
						<input class="easyui-textbox" type="text" name="jobNumber"  data-options="prompt:'请输入员工工号',validType:'length[1,16]'" id="jobNumber" value="${employee.jobNumber}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px;">所属公司：</span>
						<input type="hidden" name="companyId" id="companyId" value="${employee.companyId}">
						<input type="hidden" id="oldCompanyId" value="${employee.companyId}">
						<input type="hidden" name="defaultCompanyId"  id="defaultCompanyId" value="${sessionScope.SERVER_SESSION_USER.user.companyId}">
						<input class="easyui-combotree" editable="false" prompt="请选择所属公司" id="companyTree" style="width:255px; height: 32px">
						</input>
					</dd>
					<dd>
						<span class="title" style="width:120px;">所属项目部：</span>
						<input type="hidden" name="officeId" id="officeId" value="${employee.officeId}">
						<input type="hidden" id="oldOfficeId" value="${employee.officeId}">
						<input class="easyui-combotree" editable="false" prompt="请选择所属项目部" id="officeTree" style="width:255px; height: 32px">
						</input>
					</dd>
					<dd>
						<span class="title" style="width:120px;">所属项目：</span>
						<input type="hidden" name="prId" id="prId" value="${employee.prId}" editable="false">
						<input type="hidden" id="oldPrId" value="${employee.prId}" editable="false">
						<select class="easyui-combobox" id="projectList" style="width:255px; height: 32px" editable="false">
						</select>
					</dd>
					<dd>
						<span class="title" style="width:120px;">项目完结状态：</span>
						<select class="easyui-combobox" name="prEndState" id="prEndState" value="${employee.prEndState}" style="width:255px; height: 32px" editable="false">
							<option value="1" ${employee.prEndState == 1 ? 'selected="selected"':''}>未完结</option>
							<option value="2" ${employee.prEndState == 2 ? 'selected="selected"':''}>已完结</option>
						</select>
					</dd>
					<dd>
						<span class="title" style="width:120px;">所任职务：</span>
						<select class="select-commonDict easyui-combobox" data-modelCode="US" data-funCode="employeeJob" defualt-value="${employee.employeeJob}"
						name="employeeJob" id="employeeJob" style="width:255px; height: 32px" validType="selectNotEmpty['所任职务']" editable="false">
						</select>
					</dd>
					<dd>
						<span class="title" style="width:120px;">员工手机：</span>
						<input class="easyui-textbox" type="text" name="employeePhone" id="employeePhone" data-options="required:true, prompt:'请输入员工手机', validType:'mobile'" missingMessage="手机号不能为空"  value="${employee.employeePhone}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px;">身份证号：</span>
						<input class="easyui-textbox" type="text" name="idCard" id="idCard" data-options="required:true, prompt:'请输入身份证号', validType:['length[15,18]','idcard']" missingMessage="身份证号不能为空"  value="${employee.idCard}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px;">出生年月：</span>
						<input class="easyui-datebox" name="birthday" id="birthday" data-options="prompt:'可自动从身份证号获取',editable:false" value="<fmt:formatDate value="${employee.birthday}" pattern="yyyy-MM-dd"/>" name="language" style="width:255px; height: 32px" />
					</dd>
					<dd>
						<span class="title" style="width:120px;">户籍所在地：</span>
						<input class="easyui-textbox" type="text" name="regAddress" data-options="prompt:'请输入户籍所在地', validType:'length[1,50]'"  id="regAddress" value="${employee.regAddress}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px;">三类人员证书类型：</span>
						<select class="select-commonDict easyui-combobox" data-modelCode="US" data-funCode="thrClsCertType" defualt-value="${employee.thrClsCertType}"
								name="thrClsCertType" id="thrClsCertType" style="width:255px; height: 32px"  editable="false">
						</select>
					</dd>
					<dd>
						<span class="title" style="width:120px;">三类人员证书编号：</span>
						<input class="easyui-textbox" type="text" name="thrClsCertNum" data-options="prompt:'请输入三类人员证书编号',validType:'length[1,18]'"  id="thrClsCertNum" value="${employee.thrClsCertNum}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px;">员工头像：</span>
						<input type="hidden" name="employeePhoto" value="${employee.employeePhoto}">
						<input class="easyui-filebox"  id="uploadfile" name="uploadfile" data-options="buttonText:'选择头像',prompt:'请选择员工头像', onChange:function(){ $('#uploadBtn').linkbutton({ disabled:false }) }" value="" style="width:255px; height: 30px" /> <a id="uploadBtn" class="easyui-linkbutton" style="width:55px; height: 28px" > 上传 </a>
						<!--以下属于上传附带参数-->
						<input type="hidden" id="fileId" name="fileId" value="${employeePhoto.employeePhotoCF.fileId}" />
						<input type="hidden" name="fkType" value="EMPLOYEEHEADIMG" />
						<input type="hidden" name="modelName" value="用户板块" />
						<input type="hidden" name="modelCode" value="US" />
						<input type="hidden" name="funName" value="员工头像" />
						<input type="hidden" name="funCode" value="employeeHeadImg" />
						<input type="hidden" id="fileName" name="fileName" value="${employeePhoto.employeePhotoCF.name}" />
						<input type="hidden" id="url" name="url" value="${employeePhoto.employeePhotoCF.url}" />
						<input type="hidden" id="size" name="size" />
						<input type="hidden" id="fix" name="fix" />
						<input type="hidden" id="md5" name="md5" />
					</dd>
					<dd>
						<span class="title" style="width:120px;">员工性别：</span>
						<cite>
							<input class="easyui-validatebox textbox" type="radio" name="sex" value="2" ${employee.sex == 2 ? 'checked="checked"' : ""} data-options="required:true"/> 男
							<input class="easyui-validatebox textbox" type="radio" name="sex" value="1" ${employee.sex == null || employee.sex == 1 ? 'checked="checked"' : ""} data-options="required:true"/> 女&nbsp;&nbsp;
						</cite>
					</dd>
					<dd>
						<span class="title" style="width:120px;">员工邮箱：</span>
						<input class="easyui-textbox" type="text" name="email" data-options="prompt:'请输入员工邮箱',validType:'email'"  id="email"  value="${employee.email}" style="width:255px; height: 32px">
					</dd>
					<dd>
						<span class="title" style="width:120px; vertical-align: top">已完结项目：</span>
						<input type="hidden" name="prFinished" id="prFinished" value="${employee.prFinished}"/>
						<input class="easyui-textbox" id="prFinishedName" value="${prNames}" readonly="true" data-options="multiline:true" style="width:255px;height:100px">
					</dd>
					<dd>
						<span class="title" style="width:120px; vertical-align: top">备注信息：</span>
						<input class="easyui-textbox" name="remark" id="remark" data-options="multiline:true,prompt:'请输入备注信息', validType:'length[1,200]'" value="${employee.remark}" style="width:255px;height:100px">
					</dd>
				</dl>
			</div>
		</form>
		<div class="formbody" style="margin-left: 150px">
			<a id="optionEmployee" class="easyui-linkbutton c1" style="width:100px; height: 35px">保存</a>
			&nbsp;&nbsp;&nbsp;
			<a href="${path}/employee/index.do" class="easyui-linkbutton c1" style="width:100px; height: 35px">取消</a>
		</div>
	</body>
<script>
		jQuery(document).ready(function($) {
			$.LightBox({speed:500});
		});
</script>
</html>